class EpcData {
  final String epc;
  String? tid;
  int count;

  EpcData({
    required this.epc,
    this.tid,
    this.count = 1,
  });

  Map<String, dynamic> toJson() {
    return {
      'epc': epc,
      'tid': tid,
      'count': count,
    };
  }

  setRepeatSize(int newCount) {
    count = newCount;
  }

  factory EpcData.fromJson(Map<String, dynamic> json) {
    return EpcData(
      epc: json['epc'],
      tid: json['tid'],
      count: json['count'],
    );
  }
}

enum EPCType {
  reserved, // 保留区
  epc, // EPC
  tid, // TID
  user, // 用户数据区
}